# -*- coding: utf-8 -*-
import os

serverIP = "0.0.0.0"  # 服务器ip地址
serverPort = "6088"  # 服务器端口
downloadPath = "/data/code/verify"  # 下载文件保存目录
logoFile = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + "/logo.png"  # 应用logo图片地址
redirectDomainIP = "{}.zooming-data.com"
postUrl = "https://{}.zooming-data.com/dist-admin/api/pmAppAuth/add"  # 新增企业号app授权管理接口
itemTitle = "AW大师".decode("utf-8")  # 应用名称定义
itemText = ""  # 应用介绍
"""Mysql配置"""
host = "111.230.195.67"
user = "tester"
pwd = "fGh5atKr2yJ5RM1M"
port = 3309
db_name = "aw_sit_90"
"""Redis配置"""
redisPort = 6379
redisSitHost = "10.66.119.0"
# redisSitHost = "111.230.195.67"
redisSitPwd = "yDGA98PG0FVxW0t"
redisSitDb = 0

redisUatHost = "10.66.124.200"
redisUatPwd = "7GBgPUHmWzORIMV"
redisUatDb = 0

redisProHost = "10.66.125.91"
redisProPwd = "crs-657fe158:zunhao@123"
redisProDb = 1
"""redis状态"""
e0 = 0
e1 = -1
s1 = 1
s2 = 2
"""授权url与类型"""
homeInfoUrl = "https://{}.zooming-data.com/cropId={}"
appConfigUrl = "https://back-{}.zooming-data.com/qywx-rest/authorization/call//aw/{}"
innerAppApiurl = "https://back-{}.zooming-data.com/qywx-rest/authorization/call//user/{}"
customerUrl = "https://back-{}.zooming-data.com/qywx-rest/authorization/call//contact/{}"
awType = 0  # AW大师
userType = 1  # 通讯录
contactType = 2  # 客户
"""其他"""
wt0 = 120
wt1 = 5
wt2 = 2


def redisConf(envType):
    if envType == "sit":
        redisHost = redisSitHost
        redisPwd = redisSitPwd
        redisDb = redisSitDb
    elif envType == "uat":
        redisHost = redisUatHost
        redisPwd = redisUatPwd
        redisDb = redisUatDb
    else:
        redisHost = redisProHost
        redisPwd = redisProPwd
        redisDb = redisProDb
    return redisHost, redisPort, redisPwd, redisDb

